package com.sky.controller.user;


import com.sky.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user/shop")
@Api(tags = "客户端-店铺状态修改接口")
@Slf4j
public class ShopUserController {

    private static final String SHOP_STATUS = "SHOP_STATUS";

    @Autowired
    RedisTemplate redisTemplate;


    @GetMapping("/status")
    @ApiOperation("客户端-获取店铺状态")
    public Result getShopStatus() {
        return Result.success(redisTemplate.opsForValue().get(SHOP_STATUS));
    }

}
